/*
 * LoginInfo.java
 * 
 * Copyright 2011 Matt Whipple <matt@mattwhipple.com>
 * 
 * This file is part of com.teamsuperfitness.apps
 * 
 * com.teamsuperfitness.apps is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or (at your option)
 * any later version.
 * 
 * com.teamsuperfitness.apps is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with com.teamsuperfitness.apps. If not, see http://www.gnu.org/licenses/.
 */

package com.teamsuperfitness.apps.shared.model;
/**
* Represents information associated with the presently logged in user
* 
* @author mwhipple <matt@mattwhipple.com>
*/

import java.io.Serializable;

@SuppressWarnings("serial")
public class LoginInfo implements Serializable {
	private String loginUrl;
	private String logoutUrl;
	private IAppUser user = null;
	
	/**
	 * The URL that will allow the user to login  
	 * @return URL as String
	 */
	public String getLoginUrl() {
		return loginUrl;
	}
	public void setLoginUrl(String loginUrl) {
		this.loginUrl = loginUrl;
	}
	
	/**
	 * The URL that will allow the user to logout
	 * @return URL as String
	 */
	public String getLogoutUrl() {
		return logoutUrl;
	}
	public void setLogoutUrl(String logoutUrl) {
		this.logoutUrl = logoutUrl;
	}

	/**
	 * The internal User object with all the important info
	 * @return User
	 */
	public IAppUser getAppUser() {
		return user;
	}
	public void setAppUser(IAppUser user) {
		this.user = user;
	}
	public boolean isLoggedIn() {
		return this.user != null;
	}
}
